//引入
const express=require('express');
const favicon=require('serve-favicon');
const morgan=require('morgan');
const router=require('./router/index.js')

//配置
const app=express();
app.use(morgan('dev'));
app.use(express.static(__dirname+'/src'));
app.use(favicon('./src/images/favicon.ico'));
app.use(express.json());
app.use(express.urlencoded({extended:true}));
app.use(router);

//设置监听
app.listen(80);
